package com.matt.domain;


import com.fasterxml.jackson.annotation.JsonFormat;
import com.matt.commons.model.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @author mengzhichao
 * @create 2025-02-24-14:42
 */

@Entity
@Data
@Table(name = "vaccine_notifications")
@NoArgsConstructor
@EqualsAndHashCode(callSuper=false)
public class VaccineNotifications extends Model {


    //疫苗名称
    private String name;

    //月龄
    private String age;

    //备注
    private String remark;
    //是否免费 0是 1否
    @Column(columnDefinition = "int COMMENT '是否免费'")
    private Integer isFree;
    //疫苗价格
    @Column(columnDefinition = "DECIMAL(10,2) COMMENT '疫苗价格'")
    private BigDecimal vaPrice;

    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm", timezone="GMT+8")
    private Date createTime;

    private Date createUserId;

    //接种状态（0未接种，1已接种）
    @Transient
    private Integer state;

    //接种时间
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+08:00")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Transient
    private Date inoculateTime;
}
